import redis

# s=redis.Redis()
s = redis.Redis("127.0.0.1", 6379)

# string
s.set("name", "lili")
s.set("password", "123456")
print(s.get("name"))
print(s.get("password"))

# set集合
s.hset("student", "name", "lili")
s.hset("student", "age", 18)
print(s.hget("student", "name"))
print(s.hvals("student"))

# 获取所有的 key
list_keys = s.keys("*")
print(list_keys)

""" Run:
b'lili'
b'123456'
b'lili'
[b'lili', b'18']

"""
